package com.sinbader.xiaole.common.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("stock_log")
@ApiModel(value="StockLog对象", description="库存变更记录")
public class StockLog implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

	@ApiModelProperty(value = "库存ID")
	@TableField("stock_id")
	private Long stockId;

	@ApiModelProperty(value = "库存Version")
	@TableField("stock_version")
	private Long stockVersion;

    @ApiModelProperty(value = "商品")
    @TableField("product_id")
    private Long productId;

    @ApiModelProperty(value = "供应商")
    @TableField("supplier_id")
    private Long supplierId;

    @ApiModelProperty(value = "分店")
    @TableField("shop_id")
    private Long shopId;

    @ApiModelProperty(value = "仓库")
    @TableField("warehouse_id")
    private Long warehouseId;

    @ApiModelProperty(value = "货架")
    @TableField("shelf_Id")
    private Long shelfId;

    @ApiModelProperty(value = "库存操作类型")
    @TableField("operate_type")
    private String operateType;

    @ApiModelProperty(value = "关联单据类型")
    @TableField("order_type")
    private String orderType;

    @ApiModelProperty(value = "关联单据ID")
    @TableField("order_id")
    private Long orderId;

    @ApiModelProperty(value = "销售可用库存")
    @TableField("sale_usable_count")
    private Integer saleUsableCount;

    @ApiModelProperty(value = "销售冻结库存")
    @TableField("sale_freeze_count")
    private Integer saleFreezeCount;

    @ApiModelProperty(value = "销售已用库存")
    @TableField("sale_used_count")
    private Integer saleUsedCount;

    @ApiModelProperty(value = "销售可用库存变更")
    @TableField("sale_usable_change")
    private Integer saleUsableChange;

    @ApiModelProperty(value = "销售冻结库存变更")
    @TableField("sale_freeze_change")
    private Integer saleFreezeChange;

    @ApiModelProperty(value = "销售已用库存变更")
    @TableField("sale_used_change")
    private Integer saleUsedChange;

    @ApiModelProperty(value = "仓库可用库存")
    @TableField("warehouse_usable_count")
    private Integer warehouseUsableCount;

    @ApiModelProperty(value = "仓库冻结库存")
    @TableField("warehouse_freeze_count")
    private Integer warehouseFreezeCount;

    @ApiModelProperty(value = "仓库已用库存")
    @TableField("warehouse_used_count")
    private Integer warehouseUsedCount;

    @ApiModelProperty(value = "仓库可用库存变更")
    @TableField("warehouse_usable_change")
    private Integer warehouseUsableChange;

    @ApiModelProperty(value = "仓库冻结库存变更")
    @TableField("warehouse_freeze_change")
    private Integer warehouseFreezeChange;

	@ApiModelProperty(value = "仓库冻结库存变更")
	@TableField("warehouse_used_change")
	private Integer warehouseUsedChange;

	@ApiModelProperty(value = "乐观锁")
    @TableField("version")
    private Long version;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;


}
